#{extends 'CRUD/layout.html' /}
<div id="crudList" class="${type.name}">
	
	<h2 id="crudListTitle">&{'crud.list.title', type.name}</h2>

	<div id="crudListSearch">
		#{crud.search /}
	</div>

	<div id="crudListTable">
		#{crud.table fields:['author','post','content','addTime']}
		
		 #{crud.custom 'content'}
  		<a href="@{cpanel.Comments.show(object.id)}">
   		${object.content.length() > 50 ? object.content[0..50] + '…' : object.content}
  		</a>
 			#{/crud.custom}
		#{/crud.table}
	</div>
	
	<div id="crudListPagination">
		#{crud.pagination /}
	</div>
	
	<p id="crudListAdd">
		<a href="@{blank()}">&{'crud.add', type.modelName}</a>
	</p>

</div>
